<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico">
	<meta name="viewport" content="initial-scale=1.0, maximum-scale=2.0">

	<title>DataTables example - Generated content for a column</title>
	<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
	<link rel="stylesheet" type="text/css" href="../resources/syntax/shCore.css">
	<link rel="stylesheet" type="text/css" href="../resources/demo.css">
	<style type="text/css" class="init">

	</style>
	<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
	<script type="text/javascript" language="javascript" src="../../media/js/jquery.dataTables.js"></script>
	<script type="text/javascript" language="javascript">

$(document).ready(function() {
	var table = $('#example').DataTable( {
		"processing": true,
		"ajax": "/system/typeList.ajax?typeId=3",
		"columns": [
					{ "data": "title" },
					{ "data": "createDate" },
					{ "data": "username" }
				],
		"columnDefs": [ {
			"targets": 3,
			"data": null,
			"defaultContent": "<button>Click!</button>"
		} ]
	} );

	$('#example tbody').on( 'click', 'button', function () {
		var data = table.row( $(this).parents('tr') ).data();
		alert( data[0] +"'s salary is: "+ data[ 5 ] );
	} );
} );

	</script>
</head>

<body class="dt-example">
	<div class="container">
			

			<table id="example" class="display" cellspacing="0" width="100%">
				<thead>
					<tr>
						<th>标题</th>
						<th>编辑时间</th>
						<th>编辑人员</th>
						<th>操作</th>
					</tr>
				</thead>

				<tfoot>
					<tr>
						<th>标题</th>
						<th>编辑时间</th>
						<th>编辑人员</th>
						<th>操作</th>
					</tr>
				</tfoot>
			</table>
	</div>
</body>
</html>